(function(obj) {
	obj.ajax = {};

	ajax.xmlHttp = function() {
		var xmlHttp;
		try {
			// Firefox,Opera 8.0+,Safari
			xmlHttp = new XMLHttpRequest();

		} catch (e) {
			// Internet Explorer
			try {
				xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try {
					xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e) {
					xmlHttp = false;
				}
			}
		}
		return xmlHttp;
	};
	
	ajax.sendAjax=function(url,callback){
		var xmlHttp=ajax.xmlHttp();
		var content=null;
		xmlHttp.onreadystatechange = function() {
			if (xmlHttp.readyState == 4) {
				if(callback!=null&&typeof(callback)=='function'){
					callback(xmlHttp.responseText);
				}else{
					content=xmlHttp.responseText;
				}
			}
		};
		xmlHttp.open("GET", url, false);
		xmlHttp.send(null);
		return content;
	};

})(window);